package com.interesting.examsystem.common.core.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author ：ZXY
 * @date ：Created in 2021/2/22 17:31
 * @description：
 * @modified By：`
 * @version: 1.0
 */
public class BaseVO
        implements Serializable {
    private static final long serialVersionUID = -5497533859714070256L;
    @ApiModelProperty("创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    @ApiModelProperty("修改时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private Date updateTime;
    @ApiModelProperty("操作人ID")
    private String operatorId;

    public Date getCreateTime() {
        return this.createTime;
    }

    public Date getUpdateTime() {
        return this.updateTime;
    }

    public String getOperatorId() {
        return this.operatorId;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public void setOperatorId(String operatorId) {
        this.operatorId = operatorId;
    }

    public boolean equals(Object o) {
        if (o == this) return true;
        if (!(o instanceof BaseVO)) return false;
        BaseVO other = (BaseVO) o;
        if (!other.canEqual(this)) return false;
        Object this$createTime = getCreateTime(), other$createTime = other.getCreateTime();
        if ((this$createTime == null) ? (other$createTime != null) : !this$createTime.equals(other$createTime))
            return false;
        Object this$updateTime = getUpdateTime(), other$updateTime = other.getUpdateTime();
        if ((this$updateTime == null) ? (other$updateTime != null) : !this$updateTime.equals(other$updateTime))
            return false;
        Object this$operatorId = getOperatorId(), other$operatorId = other.getOperatorId();
        return !((this$operatorId == null) ? (other$operatorId != null) : !this$operatorId.equals(other$operatorId));
    }

    protected boolean canEqual(Object other) {
        return other instanceof BaseVO;
    }

    public int hashCode() {
        int PRIME = 59,
                result = 1;
        Object $createTime = getCreateTime();
        result = result * 59 + (($createTime == null) ? 43 : $createTime.hashCode());
        Object $updateTime = getUpdateTime();
        result = result * 59 + (($updateTime == null) ? 43 : $updateTime.hashCode());
        Object $operatorId = getOperatorId();
        return result * 59 + (($operatorId == null) ? 43 : $operatorId.hashCode());
    }

    public String toString() {
        return "BaseVO(createTime=" + getCreateTime() + ", updateTime=" + getUpdateTime() + ", operatorId=" + getOperatorId() + ")";
    }
}
